home *** CD-ROM | disk | FTP | other *** search
- ; Micro Cornucopia issue #43
- ; 86World - Figure 1 MOVMEM Macro
-
- DATA SEGMENT PUBLIC ;this structure is used by MOVMEM
- GDT DQ 0 ;DUMMY
- DQ 0 ;points to GDT
-
- DW 0FFFFh ;limit
- SRCOFS DW (?) ;low word of base
- SRCSEG DB (?) ;high byte of base
- DB 93h ;access rights
- DW 0 ;reserved
-
- DW 0FFFFh ;limit
- DSTOFS DW (?) ;low word of base
- DSTSEG DB (?) ;high byte of base
- DB 93h ;access rights
- DW 0 ;reserved
-
- DQ 0 ;points to virtual code segment
- DQ 0 ;points to virtual stack segment
- DATA ENDS
-
- MOVMEM MACRO SrcHigh,SrcLow,DstHigh,DstLow,NumWords
- MOV AX,SrcHigh
- MOV SRCSEG,AL
- MOV AX,SrcLow
- MOV SRCOFS,AX
-
- MOV AX,DstHigh
- MOV DSTSEG,AL
- MOV AX,DstLow
- MOV DSTOFS,AX
-
- MOV AX,DS
- MOV ES,AX
- MOV SI,offset GDT
- MOV CX,NumWords
- MOV AH,87h
- INT 15h ;cassette interrupt, extended move function
- ENDM